package ch.unifr.dokpe.htmlpicker.dataformater;

public class WosYearPublishedFormater extends DataFormater {
	public WosYearPublishedFormater(String label){super(label);}

	public String formatdata(){
	  
	   String result = data.get(label);
           //System.out.println("WosYearPubl. rawdata: " + result);
	  int pos = result.lastIndexOf(" ");
	  String sYear = result;
	  if (pos > 0) {
		sYear = result.substring(pos);
	   	int year =0;
		try {		
			 year= Integer.parseInt(sYear.trim());
		} catch  (NumberFormatException nfe) {
			nfe.printStackTrace();
			//result="-1";			
		}
	  }
		
	   return sYear.trim();


	}//formatdata

}//class
